package com.itheima.teacher.controller;

import com.itheima.pojo.Order;
import com.itheima.teacher.pojo.Teacher;
import com.itheima.teacher.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author ：mengw9
 * @date ：Created By 2020/9/22 19:52
 * @description：
 * @version:
 */
@RestController
@RequestMapping("/teacher")
public class TeacherController {
    @Autowired
    TeacherService teacherService;

    @GetMapping()
    public List<Teacher> queryTeacher(){
        return this.teacherService.queryTeacher();

    }

    @PostMapping()
    public List<Order> findAllOrder(){

        return this.teacherService.queryAllOrder();


    }
}
